//
//  HomePageTableViewCell.m
//  A_Comic
//
//  Created by sos on 16/1/16.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "HomePageTableViewCell.h"

@implementation HomePageTableViewCell
- (void)dealloc
{
    [_img release];
    [_labelOne release];
    [_labelTwo release];
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.img = [[UIImageView alloc]init];
        self.img.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:self.img];
        [self.img release];
        
        self.labelOne = [[UILabel alloc]init];
        self.labelOne.backgroundColor = [UIColor brownColor];
        [self.contentView addSubview:self.labelOne];
        [self.labelOne release];
        
        self.labelTwo = [[UILabel alloc]init];
        self.labelTwo.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:self.labelTwo];
        [self.labelTwo release];
        
        
        
        
    }
    return self;
    
    
    
}

-(void)layoutSubviews
{
    
    
    [super layoutSubviews];
    
    self.img.frame = CGRectMake(10, 10, self.contentView.frame.size.width-20, self.contentView.frame.size.height -50);
    
    self.labelOne.frame = CGRectMake(self.img.frame.origin.x, self.img.frame.origin.y+self.img.frame.size.height, self.contentView.frame.size.width/3, 30);
    self.labelTwo.frame = CGRectMake(self.contentView.frame.size.width-self.labelOne.frame.size.width-20, self.labelOne.frame.origin.y, self.labelOne.frame.size.width+10, self.labelOne.frame.size.height);
    self.labelTwo.font = [UIFont systemFontOfSize:15];
    self.labelTwo.textAlignment = NSTextAlignmentRight;
    
    
    
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
